From ed1050d5362a64e4574b798bd3c1ac4a5614c55a Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild.aw" Date: Mon, 4 Sep 2006 14:48:03 -0600 Subject: [PATCH] [IA64] Bug fix: do not crash if no FPSWA. Signed-off-by: Tristan Gingold --- xen/arch/ia64/xen/dom_fw.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xen/arch/ia64/xen/dom_fw.c b/xen/arch/ia64/xen/dom_fw.c index 97bacd1f2a..1aa8b42c7f 100644 --- a/xen/arch/ia64/xen/dom_fw.c +++ b/xen/arch/ia64/xen/dom_fw.c @@ -816,9 +816,12 @@ dom_fw_init(struct domain *d, FW_HYPERCALL_SAL_RETURN, 0, hypercalls_imva); /* Fill in the FPSWA interface: */ - tables->fpswa_inf.revision = fpswa_interface->revision; - dom_fpswa_hypercall_patch(d, hypercalls_imva); - tables->fpswa_inf.fpswa = (void *)FW_HYPERCALL_FPSWA_ENTRY_PADDR; + if (fpswa_interface) { + tables->fpswa_inf.revision = fpswa_interface->revision; + dom_fpswa_hypercall_patch(d, hypercalls_imva); + tables->fpswa_inf.fpswa = + (void *)FW_HYPERCALL_FPSWA_ENTRY_PADDR; + } i = 0; /* Used by MAKE_MD */ @@ -867,7 +870,8 @@ dom_fw_init(struct domain *d, bp->console_info.num_rows = 25; bp->console_info.orig_x = 0; bp->console_info.orig_y = 24; - bp->fpswa = FW_FIELD_MPA(fpswa_inf); + if (fpswa_interface) + bp->fpswa = FW_FIELD_MPA(fpswa_inf); } void dom_fw_setup(struct domain *d, unsigned long bp_mpa, unsigned long maxmem) -- 2.30.2